import request from '@/utils/request'

const api_name = '/admin/user'

export default {

    getPageList(searchObj) {
        return request({
            url: `${api_name}/page`,
            method: 'get', 
            params: searchObj
        })
    },
    createUser(user) {
        return request({
            url: `${api_name}/create`,
            method: 'post',
            data: user
        })
    },
    getUser(id) {
        return request({
            url: `${api_name}/info`,
            method: 'get',
            params: id
        })
    },
    updateUser(user) {
        return request({
            url: `${api_name}/update`,
            method: 'post',
            data: user
        })
    },
    removeUser(id) {
        return request({
            url: `${api_name}/delete`,
            method: 'delete',
            params: id
        })
    }
}